// 病历key
export const MedicalRecordKeys = {
  // 患者
  PatientName: "user_name",
  // 病历类型
  PatientCaseType: "case_type",
  // 初诊/复诊
  VisitState: "repeat",
  // 就诊时间
  DiagnosisTime: "created_at",
  // 医院名称
  Hospital: "hospital",
  // 科室名称
  Department: "section",
  // 医生名称
  DoctorName: "doctor",
  // 备注
  remarks: "remarks",
  // 病情描述
  IllnessDescribe: "msg",
  // 患处照片
  AffectedPartImg: "case_img",
  // 诊断意见
  DiagnosticOpinion: "suggest",
};

export const UserKeys = {
  // 关系
  Relation: "relation",
  // 姓名
  Name: "name",
  // 性别
  Gender: "gender",
  // 生日
  Birthday: "birth_date",
  // 身份证号
  ID: "idnumber",
  // 手机号码
  PhoneNumber: "mobile",
  // 身高
  Height: "height",
  // 体重
  Weight: "weight",
  // 腰围
  Waistline: "waist",
  // 吸烟史
  SmokingHistory: "smoke",
  // 饮酒史
  DrinkingHistory: "wine",
  // 肝功能
  LiverFunction: "liver",
  // 肾功能
  RenalFunction: "kidney",
  // 婚姻状况
  MaritalStatus: "marriage",
  // 生育状态
  FertilityStatus: "bearint",
};

export const ExaminationReportKeys = {
  // 体检时间
  ExaminationTime: "ExaminationTime",
  // 体检机构
  ExaminationOrganization: "ExaminationOrganization",
  // 报告名称
  ReportName: "ReportName",
  // 报告照片
  ReportImg: "ReportImg",
  // 报告pdf
  ReportPDF: "ReportPDF",
};

export const AuthKeys = {
  // 姓名
  Name: "name",
  // 身份证号
  IDNumber: "id",
  // 手机号
  PhoneNumber: "phone",
};

// 病例类型
export const PatientCaseTypeKeys = {
  // 门诊病例
  Outpatient: 1,
  // 自己上传
  SelfUpload: 2,
};

export const RelationTypeKeys = {
  // 本人
  Self: 1,
  // 配偶
  Spouse: 2,
  // 父母
  Parent: 3,
  // 亲属
  Relatives: 4,
};

export const GenderTypeKeys = {
  // 男
  Man: 1,
  // 女
  Woman: 2,
};

export const FunctionStatusKeys = {
  // 好
  Good: 1,
  // 坏
  Bad: 2,
};

export const StatusKeys = {
  // 有
  Have: 1,
  // 无
  Never: 2,
};

// 页面状态
export const PageState = {
  Main: "Main",
  User: "User",
  AddUser: "AddUser",
  ModifyUser: "ModifyUser",
  AddRecord: "AddRecord",
  ModifyRecord: "ModifyRecord",
  AddReport: "AddReport",
  ModifyReport: "ModifyReport",
  GetReport: "GetReport",
};

// 诊断状态
export const DiagnosisStatusKeys = {
  // 初诊
  Initial: 0,
  // 复诊
  Subsequent: 1,
};

// 病历key对应文本
export const MedicalRecordText = {
  [MedicalRecordKeys.PatientName]: "就诊人",
  [MedicalRecordKeys.PatientCaseType]: "病例类型",
  [MedicalRecordKeys.VisitState]: "初诊/复诊",
  [MedicalRecordKeys.DiagnosisTime]: "就诊时间",
  [MedicalRecordKeys.Hospital]: "医院",
  [MedicalRecordKeys.Department]: "科室",
  [MedicalRecordKeys.DoctorName]: "医生姓名",
  [MedicalRecordKeys.remarks]: "备注",
  [MedicalRecordKeys.IllnessDescribe]: "病情描述",
  [MedicalRecordKeys.AffectedPartImg]: "患处照片",
  [MedicalRecordKeys.DiagnosticOpinion]: "诊断意见",
};

export const UserInfoText = {
  [UserKeys.Relation]: "与您的关系",
  [UserKeys.Name]: "姓名",
  [UserKeys.Gender]: "性别",
  [UserKeys.Birthday]: "出生日期",
  [UserKeys.ID]: "身份证号",
  [UserKeys.PhoneNumber]: "手机号",
  [UserKeys.Height]: "身高",
  [UserKeys.Weight]: "体重",
  [UserKeys.Waistline]: "腰围",
  [UserKeys.SmokingHistory]: "吸烟史",
  [UserKeys.DrinkingHistory]: "饮酒史",
  [UserKeys.LiverFunction]: "肝功能",
  [UserKeys.RenalFunction]: "肾功能",
  [UserKeys.MaritalStatus]: "婚姻状况",
  [UserKeys.FertilityStatus]: "生育状态",
};

export const ExaminationReportText = {
  [ExaminationReportKeys.ExaminationTime]: "体检时间",
  [ExaminationReportKeys.ExaminationOrganization]: "体检机构",
  [ExaminationReportKeys.ReportName]: "报告名称",
  [ExaminationReportKeys.ReportImg]: "上传报告（照片）",
  [ExaminationReportKeys.ReportPDF]: "上传报告（PDF）",
};

export const PatientCaseTypeText = {
  [PatientCaseTypeKeys.SelfUpload]: "自己上传",
  [PatientCaseTypeKeys.Outpatient]: "门诊病例",
};

export const DiagnosisStatusText = {
  [DiagnosisStatusKeys.Initial]: "初诊",
  [DiagnosisStatusKeys.Subsequent]: "复诊",
};

export const RelationTypeText = {
  [RelationTypeKeys.Self]: "本人",
  [RelationTypeKeys.Spouse]: "配偶",
  [RelationTypeKeys.Parent]: "父母",
  [RelationTypeKeys.Relatives]: "亲属",
};

export const GenderTypeText = {
  [GenderTypeKeys.Man]: "男",
  [GenderTypeKeys.Woman]: "女",
};

export const FunctionStatusText = {
  [FunctionStatusKeys.Good]: "好",
  [FunctionStatusKeys.Bad]: "坏",
};

export const StatusText = {
  [StatusKeys.Have]: "有",
  [StatusKeys.Never]: "无",
};

export const AuthText = {
  [AuthKeys.Name]: "姓名",
  [AuthKeys.IDNumber]: "身份证",
  [AuthKeys.PhoneNumber]: "手机号",
};

export const MedicalRecordCheckList = [
  MedicalRecordKeys.PatientName,
  MedicalRecordKeys.PatientCaseType,
  MedicalRecordKeys.VisitState,
  MedicalRecordKeys.DiagnosisTime,
  MedicalRecordKeys.Hospital,
  MedicalRecordKeys.Department,
  MedicalRecordKeys.DoctorName,
];

export const RequiredItemList = [
  UserKeys.Relation,
  UserKeys.Name,
  UserKeys.Gender,
  UserKeys.Birthday,
  UserKeys.ID,
  UserKeys.PhoneNumber,
];

export const OptionalItemList = [
  UserKeys.Height,
  UserKeys.Weight,
  UserKeys.Waistline,
  UserKeys.SmokingHistory,
  UserKeys.DrinkingHistory,
  UserKeys.LiverFunction,
  UserKeys.RenalFunction,
  UserKeys.MaritalStatus,
  UserKeys.FertilityStatus,
];

export const SelectItem = [
  UserKeys.Relation,
  UserKeys.Gender,
  UserKeys.SmokingHistory,
  UserKeys.DrinkingHistory,
  UserKeys.LiverFunction,
  UserKeys.RenalFunction,
  UserKeys.MaritalStatus,
  UserKeys.FertilityStatus,
];

export const ExaminationReportList = [
  ExaminationReportKeys.ExaminationTime,
  ExaminationReportKeys.ExaminationOrganization,
  ExaminationReportKeys.ReportName,
  ExaminationReportKeys.ReportImg,
  ExaminationReportKeys.ReportPDF,
];

export const ExaminationReportCheckList = [
  ExaminationReportKeys.ExaminationTime,
  ExaminationReportKeys.ExaminationOrganization,
  ExaminationReportKeys.ReportName,
];

export const PatientCaseTypeList = [
  PatientCaseTypeKeys.Outpatient,
  PatientCaseTypeKeys.SelfUpload,
];

export const DiagnosisStatusList = [
  DiagnosisStatusKeys.Initial,
  DiagnosisStatusKeys.Subsequent,
];

export const RelationTypeList = [
  RelationTypeKeys.Self,
  RelationTypeKeys.Spouse,
  RelationTypeKeys.Parent,
  RelationTypeKeys.Relatives,
];

export const GenderTypeList = [GenderTypeKeys.Man, GenderTypeKeys.Woman];

export const FunctionStatusList = [
  FunctionStatusKeys.Good,
  FunctionStatusKeys.Bad,
];

export const StatusList = [StatusKeys.Have, StatusKeys.Never];

export const AuthList = [
  AuthKeys.Name,
  AuthKeys.IDNumber,
  AuthKeys.PhoneNumber,
];

export const defaultRecord = {
  [MedicalRecordKeys.PatientName]: "",
  [MedicalRecordKeys.PatientCaseType]: PatientCaseTypeKeys.Outpatient,
  [MedicalRecordKeys.VisitState]: DiagnosisStatusKeys.Initial,
  [MedicalRecordKeys.DiagnosisTime]: "",
  [MedicalRecordKeys.Hospital]: {},
  [MedicalRecordKeys.Department]: {},
  [MedicalRecordKeys.DoctorName]: "",
  [MedicalRecordKeys.remarks]: "",
  [MedicalRecordKeys.IllnessDescribe]: "",
  [MedicalRecordKeys.AffectedPartImg]: [],
};

export const defaultUser = {
  id: "",
  [UserKeys.Relation]: RelationTypeKeys.Self,
  [UserKeys.Name]: "",
  [UserKeys.Gender]: GenderTypeKeys.Man,
  [UserKeys.Birthday]: "",
  [UserKeys.ID]: "",
  [UserKeys.PhoneNumber]: "",
  [UserKeys.Height]: "",
  [UserKeys.Weight]: "",
  [UserKeys.Waistline]: "",
  [UserKeys.SmokingHistory]: StatusKeys.Never,
  [UserKeys.DrinkingHistory]: StatusKeys.Never,
  [UserKeys.LiverFunction]: FunctionStatusKeys.Good,
  [UserKeys.RenalFunction]: FunctionStatusKeys.Good,
  [UserKeys.MaritalStatus]: StatusKeys.Never,
  [UserKeys.FertilityStatus]: StatusKeys.Never,
};

export const defaultExaminationReport = {
  [ExaminationReportKeys.ExaminationTime]: "",
  [ExaminationReportKeys.ExaminationOrganization]: "",
  [ExaminationReportKeys.ReportName]: "",
  [ExaminationReportKeys.ReportImg]: "",
  [ExaminationReportKeys.ReportPDF]: "",
};

export const defaultAuth = {
  [AuthKeys.Name]: "",
  [AuthKeys.IDNumber]: "",
  [AuthKeys.PhoneNumber]: "",
};
